package 命令模式;

public class BeatsOnCommand implements Command{
    BeatsReceiver beatsReceiver;
    BeatsOnCommand(BeatsReceiver beatsReceiver){
        this.beatsReceiver=beatsReceiver;
    }
    @Override
    public void execute() {
        beatsReceiver.on();
    }

    @Override
    public void undo() {

        beatsReceiver.off();
    }
}
